<%@page import="org.springframework.security.core.context.SecurityContextHolder"%>
<%@page import="org.apache.commons.lang.StringUtils"%>
<%@page import="org.apache.commons.lang.time.DateFormatUtils"%>
<%@page import="org.springframework.util.CollectionUtils"%>
<%@page import="java.util.Collection"%>
<%@ include file="../common/common_include.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	AreaForm form = (AreaForm)request.getAttribute("command");
	VDstarea varea = null;
	if(null!=request.getAttribute("varea")){
		varea = (VDstarea)request.getAttribute("varea");
	}
%>

<div>
	<form id="AreaEditForm" target="_coreIframe" method="post" action="<%=request.getContextPath()%>/area/doEdit" enctype="multipart/form-data">
		<div class="breadcrumb">
			<div class="bcIcon"></div>
			<ul class="bcNav">
				<li>编辑区域</li>
			</ul>
		</div>
		<input type="hidden" name="fldidd" value="<%=EncrypTool.encode(varea.getFldidd()+"")%>">
		<table class="formTable">
			<tr>
				<td class="tdTitle">区域名称：</td>
				<td>
					<input class="inputText xs" type="text"  value="<%=varea.getFldsitenames() %>" name="fldsitenames">
					<span class="errorTipWrap" id="errorTip_fldsitenames"></span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">全拼拼音编码：</td>
				<td><input class="inputText xs" type="text"  value="<%=StringUtils.isNotBlank(varea.getFldpys())?varea.getFldpys():"" %>" name="fldpys">
				</td>
			</tr>
			<tr>
				<td class="tdTitle">营运方式：</td>
				<td>
					<select name="fldruntypes">
						<option value="直营" <%=StringUtils.equalsIgnoreCase("直营", varea.getFldruntypes())?"selected=selected":""%> >直营</option>
						<option value="加盟" <%=StringUtils.equalsIgnoreCase("加盟", varea.getFldruntypes())?"selected=selected":""%>>加盟</option>
					</select>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">所属抬头：</td>
				<td>
					<select id="areaNameList" class="easyui-combobox" name="areaId" style="width:200px;">
					</select>
					<span class="item-tip">请使用空格或退格键搜索</span>
					<span class="errorTipWrap" id="errorTip_areaId"></span>
				</td>
			</tr>
			
			<tr>
				<td class="tdTitle">所属网点编号：</td>
				<td><input class="inputText inputText-gray xs" type="text" value="" name="siteId" readonly="readonly">
				</td>
			</tr>
			
			<tr>
				<td class="tdTitle">所属网点名称：</td>
				<td><input class="inputText inputText-gray xs" type="text" value="" name="siteName" readonly="readonly">
				</td>
			</tr>

			<tr>
				<td class="tdTitle">服务项目：</td>
				<td class="" colspan="2">
					<div class="checkbox-wrap">
						<label>
							<input type="checkbox" value="1" name="flddaofuflagd" class="checkbox"
								<%=StringUtils.equalsIgnoreCase("1", varea.getFlddaofuflagd()+"")?"checked=checked":""%>
							>
							<span>可到付</span>
						</label>
						<label>
							<input type="checkbox" value="1" name="flddaiqianflagd" class="checkbox"
								<%=StringUtils.equalsIgnoreCase("1", varea.getFlddaiqianflagd()+"")?"checked=checked":""%>
							>
							<span>可代签回单</span>
						</label>
						<label>
							<input type="checkbox" value="1" name="flddaishouflagd" class="checkbox"
								<%=StringUtils.equalsIgnoreCase("1", varea.getFlddaishouflagd()+"")?"checked=checked":""%>
							>
							<span>可代收款</span>
						</label>
						<label>
							<input type="checkbox" value="1" name="fldjiriflagd" class="checkbox"
								<%=StringUtils.equalsIgnoreCase("1", varea.getFldjiriflagd()+"")?"checked=checked":""%>
							>
							<span>可作即日件</span>
						</label>
					</div>
				</td>
			</tr>
			
			<tr>
				<td class="tdTitle">负责人：</td>
				<td>
					<input class="inputText xs" type="text" value="<%=varea.getFldowners()%>" name="fldowners">
					<span class="errorTipWrap" id="errorTip_fldowners"></span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">手机：</td>
				<td>
					<input class="inputText xs" type="text" value="<%=varea.getFldmobiles() %>" name="fldmobiles">
					<span class="errorTipWrap" id="errorTip_fldmobiles"></span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">传真：</td>
				<td><input class="inputText xs" type="text" value="<%=varea.getFldfaxs() %>" name="fldfaxs">
				</td>
			</tr>
			<tr>
				<td class="tdTitle">详细地址：</td>
				<td>
					<input class="inputText l" type="text" value="<%=varea.getFldaddresss()%>" name="fldaddresss">
					<span class="errorTipWrap" id="errorTip_fldaddresss"></span>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">排序：</td>
				<td><input class="inputText xxxs" type="text" value="<%=varea.getFldsortd()%>" name="fldsortd">
				<label>
					<input type="checkbox" value="1" name="fldhided" class="checkbox"
						<%=StringUtils.equalsIgnoreCase("1", varea.getFldhided()+"")?"checked=checked":""%>
					>
					<span>隐藏</span>
				</label>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">客服电话：</td>
				<td>
					<textarea class="textArea"  name="fldtels"><%=varea.getFldtels() %></textarea>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">派送区域：</td>
				<td>
					<textarea class="textArea"  name="fldregions"><%=StringUtils.isNotBlank(varea.getFldregions())? varea.getFldregions():"" %></textarea>
				</td>
			</tr>
			<tr>
				<td class="tdTitle">加工作日派送：</td>
				<td>
					<textarea class="textArea"  name="fldadddayregions"><%=StringUtils.isNotBlank(varea.getFldadddayregions())? varea.getFldadddayregions():"" %></textarea>
				</td>
			</tr>	
		
			<tr>
				<td class="tdTitle">不派送区域：</td>
				<td>
					<textarea class="textArea"  name="fldoutregions"><%=StringUtils.isNotBlank(varea.getFldoutregions())? varea.getFldoutregions():"" %></textarea>
				</td>
			</tr>

			<tr>
				<td class="tdTitle"></td>
				<td>
					<div>
						<input class="input-btn-microsoft" type="submit" value="提交">
						<a class="a-btn-microsoft" href="javascript:XF.Area.listArea()">取消</a>
					</div>
				</td>
			</tr>	
		</table>
	</form>
	<iframe id="_coreIframe" name="_coreIframe" style="display: none;"></iframe>
</div>
<script type="text/javascript">
	$("input[name=fldsitenames]").focus();
	XF.Area.init("<%=varea.getFldofareas()%>","<%=varea.getFldofsites()%>","<%=varea.getSiteName()%>");
</script>



